home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / replace_program < prev    next >
Text File  |  2001-04-06  |  2KB  |  31 lines

  1. SYNOPSIS
  2.         void replace_program(string program)
  3.  
  4. DESCRIPTION
  5.         Substitutes a program with an inherited one. This is useful if
  6.         you consider the performance and memory consumption of the
  7.         driver. A program which doesn't need any additional variables
  8.         and functions (except during creation) can call
  9.         replace_program() to increase the function-cache hit-rate of
  10.         the driver which decreases with the number of programs in the
  11.         system.         Rooms are a good example for the application of this
  12.         function, as many rooms just consist of an inherit statement
  13.         and the configure function. Any object can call
  14.         replace_program() but looses all extra variables and functions
  15.         which are not defined by the inherited program.
  16.  
  17.         When replace_program() takes effect, shadowing is stopped on
  18.         the object since 3.2@166.
  19.  
  20.         It is not possible to replace the program of an object after
  21.         (lambda) closures have been bound to it. It is of course
  22.         possible to first replace the program and then bind lambda
  23.         closures to it.
  24.  
  25.         The program replacement does not take place with the call to
  26.         the efun, but is merely scheduled to be carried out at the end
  27.         of the backend cycle. This may cause closures to have
  28.         references to then vanished lfuns of the object. This poses no
  29.         problem as long as these references are never executed after
  30.         they became invalid.
  31.